package br.unesp.rc.rafaelt.model.dao;

import java.io.Serializable;

import javax.persistence.Query;
import javax.persistence.TypedQuery;

public interface AbstractDao<PK extends Serializable, E> {

    E findById(PK id);

    void remove(E entity);

    void persist(E entity);

    E merge(E entity);

    void flush();
    
    TypedQuery<E> createTypedQuery(final String query);

    void setParameters(final Query query, final Object[] params);

}
